1. Field of the Invention
The present invention relates to a method of detecting the speed of a motor or a moving body driven by a motor, and more particularly to a method of detecting the speed of a motor or a moving body driven by a motor when the motor operates at a low speed.
2. Description of the Prior Art
Means for detecting the speed and position of a motor and a moving body driven by the motor include a tachogenerator employed for the detection of speed and a pulse generator employed for the detection of position. Since the speed can also be detected by the pulse generator, a method is practiced of detecting the position and speed of a motor or a moving body driven thereby, by using a pulse generator only as a detector because the use of only the pulse generator helps in terms of cost.
Various methods have been proposed for detecting the speed using a pulse generator.
FIG. 1 of the accompanying drawings illustrates one prior method. A pulse generator 102 generates one pulse each time the shaft of a motor 101 rotates through an angular interval .DELTA.X determined by the hardware of a pulse generator. The output pulses of the pulse generator 102 are counted by a counter 103 for a certain sampling interval .DELTA.T. The count value of the counter 103 is transferred to a register 104 each time a sampling pulse is applied to the register 104. The counter 103 is reset and the value stored in the register 104 is read by a microcomputer 105, which then effects the following arithmetic operation on the read data to detect the speed of the motor 101: ##EQU1##
The speed computed according to the equation (1) has a digital value, which is stored in a register in the microcomputer 105.
The analog value of the speed can be derived by applying the digital value to a digital-to-analog converter.
Speed control can be realized by applying the speed value to a servo system actually in use, in spite of applying a speed detecting signal of a tachogenerator.
With the above method, however, the counter 103 only counts N pulses corresponding to an angle .theta.n or N.times..DELTA.X during one sampling interval between sampling pulses SP1 and SP2, although the motor actually rotates through an angle .theta.r, with the result that a counting error of up to about one pulse at maximum may be produced. Although this error is negligible when the value of N is large as in high-speed rotation, the value of N is reduced as the motor speed is lowered, and accurate speed detection cannot be made. In particular, if the period of pulses is longer than the sampling interval, the detected speeds will become intermittent making speed control unstable in the control system.
For detecting the speed accurately while the motor rotates at a low speed, it is necessary to increase the number of pulses generated per revolution of the pulse generator or to increase the sampling interval .DELTA.T.
However, the number of pulses that can be produced by the pulse generator is limited due to the size and cost of the detector, and the sampling interval has to be 1 millisec. or shorter in view of the response of the speed control system. Assuming that the number of pulses produced while the pulse generator makes one revolution is ten thousands and the sampling interval is 1 millisec., the period of pulses generated by the pulse generator when the motor rotates at a low speed of 1 rpm is 6 millisec. This means that one pulse is generated in six successive sampling intervals, and that the speed as computed according to the equation (1) becomes intermittent as shown in FIG. 3, a condition in which accurate speed cannot be detected.
There has been proposed a method to be effected by an arrangement shown in FIG. 4 for accurately detecting the speed while the motor rotates at a low speed. In FIG. 4, 112 denotes a clock pulse generator, 113 a counter, 114 a register, and 115 a circuit for discriminating the direction of rotation.
When the pulse generator produces one pulse (PG1) as shown in FIG. 5, the count of the counter 113 is transferred to the register 114 in FIG. 4 and the counter 113 is reset and starts counting clock pulses generated by the clock pulse generator 112. When the pulse generator generates a second pulse (PG2), the count (N in FIG. 5) of the counter 113 is transferred to the register 114, and the counter 113 is reset to start counting clock pulses.
The value (N) in the register 114 is read by the microcomputer 105, which computes a speed V according to the following equation: EQU V=.DELTA.X/TcN (2)
where .DELTA.X is the rotational angle per pulse of the pulse generator, Tc the period of clock pulses produced by the clock generator, and N is the count of the counter.
If ten thousand pulses are generated per revolution of the pulse generator and the clock frequency is 100 KHz, then the equation (2) is changed to the equation (3): ##EQU2## If the motor rotates at a low speed of 1 rpm, the interval of time between the pulses PG1 and PG2 in FIG. 5 is 6 millisec., and the count of the counter 113 is 600, so that the speed can be determined according to the equation (3). With this method, the value of N becomes greater as the speed of rotation of the motor is higher. Thus, the speeds can be detected without interruption as shown in FIG. 3.
However, the detected speeds are stepwise as shown in FIG. 5 and will deviate widely from the actual speed when the speed changes sharply as in acceleration or deceleration.
Further, inasmuch as the clock pulses between PG1 and PG2 are counted to determine an average speed the value of which is held from PGS to PG3, the speed detected the moment the pulse PG2 is generated is not an instantaneous speed at PG2, but an instantaneous speed at a midpoint substantially between PG1 and PG2, and is thus delayed by a time equal to half the time interval between PG1 and PG2.
Generally, the response characteristics of a control system are poor if there is a delay in detecting the variable to be controlled.
In the above method, therefore, there is a delay element in the speed loop which fails to increase the gain of the speed loop, so that the response characteristics of the speed control system becomes worse. This drawback becomes serious in low-speed rotation since the delay time is increased.
For accurate positioning control, for example, the speed of movement of an object to be positionally controlled becomes progressively lower as the object approaches a target position and the speed of movement falls to zero at the target position.
To accomplish rapid and accurate positioning, therefore, the control system is required to respond quickly to a positioning command signal particularly when the object approaches in the vicinity of the target position. Therefore, the loop gain of the speed control system must be sufficiently large.
With the conventional arrangement as described above, however, the delay time becomes longer as the speed is lower and hence it becomes more and more difficult to increase the loop gain at lower speeds.
There has also been proposed a method of detecting an actual speed more accurately (see, for example, Japanese Patent Laid-Open Publication No. 203959/1982 entitled "Method of Detecting the Speed of a Synchronous Motor").
The above proposed method can be applied to an arrangement as shown in FIG. 6, for example. In FIG. 6, 121 denotes a DC motor, 122 a power amplifier for driving the DC motor 121, 124 an analog-to-digital converter, 125 a current detector, 126 an interrupt pulse generator, 127 a microcomputer, and 123 a flip-flop which can be set by a pulse PG generated by the pulse generator 102 and reset by a speed computation end signal RT issued by the microcomputer 127.
It is assumed that the pulse generator 102 generates ten thousand pulses per revolution, the clock pulse generator 112 generates clock pulses at a frequency 100 KHz, and the period (Ts in FIG. 7) of interrupt pulses iTP generated by the interrupt pulse generator 126 is 1 millisec. When the pulse generator 102 generates a pulse (PG2 in FIG. 7), the flip-flop 123 is set. When an interrupt pulse iTP is then generated (at a time t2 in FIG. 7, when n =0 in the equation (4) described below), the microcomputer 127 checks the value of an output Q of the flip-flop 123 to determine whether the flip-flop 123 is set or not.
Since the flip-flop 123 is set (at the time t2 when the interrupt pulse iTP is generated), the speed is computed in the same manner as described with reference to FIG. 4. The computed speed is used as an initial value V.sub.[0] in the equation (4).
The count N of the counter 113 which is stored in the register 114 in FIG. 6 is read by the microcomputer 127. As the count N represents the period of pulses generated by the pulse generator, i.e., the time from PG1 to PG2 in FIG. 7, the value V derived from the equation (3) is used as a detected speed. The value of the speed is also stored as V.sub.[n-1] in a register in the microcomputer 127. The flip-flop 123 is reset by the speed computation end signal RT produced.
While the flip-flop 123 is being reset, an arithmetic operation is carried out according to the equation (4) each time an interrupt pulse iTP is produced, to produce an estimated value V.sub.[n] of speed. ##EQU3## where K.sub.T is the torque constant of the motor, J.sub.m the inertia of the motor, J.sub.L the inertia of the load, T.sub.S the sampling interval (equal to Ts in FIG. 7), I.sub.[n-2] the value of the current in the motor, which is the value of I at the time when the next preceding but one interrupt pulse is generated, and V.sub.[n-1] the estimated speed which is the value of V at the time the next preceding interrupt pulse is generated.
When an interrupt signal iTP is generated at t3 in FIG. 7, since the flip-flop 123 has been reset, an estimated speed V.sub.[n] is computed using the value of the current I.sub.[n-2] which is stored in a register C in the microcomputer 127 and which is the value of I at the time the next preceding but one interrupt pulse is generated, the estimated speed V.sub.[n-1] which is stored in a register B in the microcomputer 127 and which is one sampled data prior to the computation, and the equation (4). The computed speed is used as a detected speed, the value of which is stored as V.sub.[n-1] in the register B. The value of a current I.sub.[n-1] which is one sampled data prior to the computation is stored in a register D as the value of a current I.sub.[n-2] which is two sampled data prior to the computation.
The current in the DC motor 121 is detected by the current detector 125 and converted into a digital quantity by the analog-to-digital converter 124, and the digital value is read by the microcomputer 127 and stored as I.sub.[n-1] in the register C.
The speed detecting method disclosed in the above Laid-Open Publication detects the angular velocity by repeating the foregoing operation. Comparison between FIGS. 5 and 7 shows that the angular velocity detected by the method shown in FIG. 6 varies in a step-like manner at a smoother rate than that at which the angular velocity detected by the method of FIG. 4 varies.
In the above method, however, the equation (4) has no term with respect to a load torque. Since the current I.sub.[n-2] at the time the next preceding but one interrupt pulse is generated is required for computing the temporal estimated speed V.sub.[n], any difference between the estimated speed and the actual speed will be increased if the load torque is varied or the current command value is varied.
An initial value required to carry out the computation according to the equation (4) employs the value computed according to the equation (3). However, the value derived from the equation (3) is based on the method shown in FIG. 4. As described above, this value is an average speed between PG and PG in FIG. 5, for example, and hence is not an instantaneous speed at PG which should be used.
In other words, the speed detecting method employing the equation (4) uses as an initial value the value containing a difference with the actual speed. As a consequence, the lower the speed, the greater the difference between the detected speed and the actual speed, and the angular velocity is detected with a greater delay, as shown in FIG. 8. This condition is essentially the same as the incorporation of a dead time element in the speed control loop. Therefore, the gain of the speed control loop cannot be increased in low-speed rotation, and the speed control method is essentially subjected to the drawback with the method shown in FIG. 4. It is accordingly extremely difficult to effect highly accurate position detection and high-speed and highly accurate speed detection.